#include <iostream>
#include <mutex>
#include <queue>
#include <condition_variable>
using namespace std;
class Taskqueue
{
public:
    Taskqueue(int capacity);
    ~Taskqueue(){}
    int pop();
    void push(const int value);
    bool full();
    bool empty();
    int _capacity;
    mutex _mutex;
    queue<int> _queue;
    std::condition_variable _notfull;
    std::condition_variable _notempty;
};

